home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / language / embedded / develop / symcoff.arc / PFILEHDR.H < prev    next >
C/C++ Source or Header  |  1988-08-30  |  3KB  |  112 lines

  1. /* Copyright 1985 by Motorola Inc. */ 
  2. /* @(#)pfilehdr.h    2.1 */
  3. struct filehdr {
  4.     unsigned short    f_magic;    /* magic number */
  5.     unsigned short    f_nscns;    /* number of sections */
  6.     long        f_timdat;    /* time & date stamp */
  7.     long        f_symptr;    /* file pointer to symtab */
  8.     long        f_nsyms;    /* number of symtab entries */
  9.     unsigned short    f_opthdr;    /* sizeof(optional hdr) */
  10.     unsigned short    f_flags;    /* flags */
  11.     };
  12.  
  13.  
  14. /*
  15.  *   Bits for f_flags:
  16.  *
  17.  *    F_RELFLG    relocation info stripped from file
  18.  *    F_EXEC        file is executable  (i.e. no unresolved
  19.  *                external references)
  20.  *    F_LNNO        line nunbers stripped from file
  21.  *    F_LSYMS        local symbols stripped from file
  22.  *    F_MINMAL    this is a minimal object file (".m") output of fextract
  23.  *    F_UPDATE    this is a fully bound update file, output of ogen
  24.  *    F_SWABD        this file has had its bytes swabbed (in names)
  25.  *    F_AR16WR    this file created on AR16WR machine(e.g. 11/70)
  26.  *    F_AR32WR    this file created on AR32WR machine(e.g. vax)
  27.  *    F_AR32W        this file created on AR32W machine (e.g. 3b,maxi)
  28.  *    F_PATCH        file contains "patch" list in optional header
  29.  *    F_NODF        (minimal file only) no decision functions for
  30.  *                replaced functions
  31.  */
  32.  
  33. #define  F_RELFLG    0000001
  34. #define  F_EXEC        0000002
  35. #define  F_LNNO        0000004
  36. #define  F_LSYMS    0000010
  37. #define  F_MINMAL    0000020
  38. #define  F_UPDATE    0000040
  39. #define  F_SWABD    0000100
  40. #define  F_AR16WR    0000200
  41. #define  F_AR32WR    0000400
  42. #define  F_AR32W    0001000
  43. #define  F_PATCH    0002000
  44. #define  F_NODF        0002000
  45.  
  46.  
  47. /*
  48.  *   Magic Numbers
  49.  */
  50.  
  51.     /* Basic-16 */
  52.  
  53. #define  B16MAGIC    0502
  54. #define  BTVMAGIC    0503
  55.  
  56.     /* x86 */
  57.  
  58. #define  X86MAGIC    0510
  59. #define  XTVMAGIC    0511
  60.  
  61.     /* n3b */
  62. /*
  63.  *   NOTE:   For New 3B, the old values of magic numbers
  64.  *        will be in the optional header in the structure
  65.  *        "aouthdr" (identical to old 3B aouthdr).
  66.  */
  67.  
  68. #define  N3BMAGIC    0550
  69. #define  NTVMAGIC    0551
  70.  
  71.     /*  XL  */
  72. #define     XLMAGIC    0540
  73.  
  74.     /*  MAC-32   3b-5  */
  75.  
  76. #define  FBOMAGIC    0560
  77. #define  RBOMAGIC    0562
  78. #define  MTVMAGIC    0561
  79.  
  80.  
  81.     /* VAX 11/780 and VAX 11/750 */
  82.  
  83.             /* writeable text segments */
  84. #define VAXWRMAGIC    0570
  85.             /* readonly sharable text segments */
  86. #define VAXROMAGIC    0575
  87.  
  88.  
  89.     /* Motorola 68000 */
  90. #define    MC68MAGIC    0520    /* System V/68 magic number */
  91. #define    MC68TVMAGIC    0521    /* Bell only */
  92. #define    M68MAGIC    0210    /* Bell only */
  93. #define    M68TVMAGIC    0211    /* Bell only */
  94.  
  95. /* Magic numbers for COFF header */
  96. #define M6800MAGIC    800        /* M6800    */
  97. #define M6801MAGIC    801        /* M6801    */
  98. #define M68hc01MAGIC    803        /* M68HC01    */
  99. #define M6804MAGIC    804        /* M6804    */
  100. #define M6805MAGIC    805        /* M6805    */
  101. #define M6809MAGIC    809        /* M6809    */
  102. #define M68hc11MAGIC    811        /* M68HC11    */
  103.  
  104.  
  105.     /* IBM 370 */
  106. #define    U370WRMAGIC    0530    /* writeble text segments    */
  107. #define    U370ROMAGIC    0535    /* readonly sharable text segments    */
  108.  
  109. #define    FILHDR    struct filehdr
  110. #define    FILHSZ    sizeof(FILHDR)
  111. /* Copyright 1985 by Motorola Inc. */
  112.